package collection;

public abstract class ANodeCommand<E> implements ICommand{

	protected ANode<E> node;
	
	public ANodeCommand<E> receiveNode(ANode<E> node)
	{
		this.node = node;
		return this;
	}
	
	public abstract void applyToElement(E element);
	
	@Override
	public void execute()
	{
		applyToElement(this.node.getElement());
	}
	
	public void preRecursionAction(){}
	
	public void postRecursionAction(){}
	
}
